for row in range ( 1, 10 ):
    for col in range ( 1, row + 1 ):
        print ( '{}*{}={:<4}'.format(row, col, row*col ) , end=' ' )
    print ( '' )

print ( '' )
print ( '=' * 60 )

for row in range ( 9, 0,-1 ):
    for col in range ( 1, row + 1 ):
        print ( '{}*{}={:<4}'.format(row, col, row*col ) , end=' ' )
    print ( '' )
